<template>
  <div id="app">
    <router-view v-wechat-title="$route.meta.title"></router-view>
  </div>
</template>

<script>
  import {mapActions} from 'vuex'
  export default {
    name: 'app',
    methods: {
      ...mapActions([
        'getStorage'
      ])
    },
    components: {
    },
    computed: {
    },
    mounted () {
      this.getStorage('erpToken').then((val) => {
        if (val === null || val === undefined) {
          this.$router.push('/login')
        }
      }, function (val) {
        console.log(val)
      })
    }
  }
</script>

<style lang="less" scoped>
  #app {
    font-family: 'PingFangSC-Light','Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .right-view {
    .right-container {
      .mg-bt-20 {
        margin-bottom: 20px;
      }
      /*面包屑*/
      .bread-crumb {
        border: 1px solid #eee;
        padding: 3px;
      }
    }
  }
  center{display:block;margin:0 auto;width:100%;}
</style>
